<template>
  <el-row class="tac">
    <el-col :span="24">
      <h2 class="mb-2">系统菜单</h2>
      <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
      >
        <el-sub-menu index="1">
          <template #title>
            <el-icon><Avatar /></el-icon>
            <span>个人信息</span>
          </template>
          <el-menu-item index="1-1" @click="nomone">信息详情</el-menu-item>
          <el-dialog v-model="dialogFormVisible" title="个人信息">
            <PersonDetail></PersonDetail>
          </el-dialog>
          <el-menu-item index="1-2" @click="this.nomtwo=true">修改信息</el-menu-item>
          <el-dialog v-model="nomtwo" width="30%" center>
            <information></information>
          </el-dialog>
        </el-sub-menu>
        <el-sub-menu index="2">
          <template #title>
            <el-icon><setting /></el-icon>
            <span>社区管理</span>
          </template>
          <el-menu-item index="2-1" @click="this.communityone=true"
            >社区详情</el-menu-item
          >
          <el-dialog v-model="communityone" width="30%" center>
            <community></community>
          </el-dialog>
          <el-menu-item index="2-2" @click="communitytwo"
            >社区人员管理</el-menu-item
          >
          <el-menu-item index="2-3" @click="communitythree"
            >社区绿化</el-menu-item
          >
        </el-sub-menu>
        <el-sub-menu index="3">
          <template #title>
            <el-icon><document /></el-icon>
            <span>社区计划</span>
          </template>
          <el-menu-item index="3-1" @click="planone">计划查询</el-menu-item>
          <el-menu-item index="3-2" @click="this.plantwo=true">计划申请</el-menu-item>
          <el-dialog v-model="plantwo" width="30%" center>
            <InsertPlan></InsertPlan>
          </el-dialog>
        </el-sub-menu>
        <el-sub-menu index="4" disabled>
          <template #title>
            <el-icon><More /></el-icon>
            <span>敬请期待</span>
          </template>
        </el-sub-menu>
      </el-menu>
    </el-col>
  </el-row>
</template>

<script>
import Information from '../../modifaction/information.vue';
import PersonDetail from "../../modifaction/person-detail.vue";
import community from "../../nav/navTylir/secondaryMenu/Community.vue"
import InsertPlan from './secondaryMenu/InsertPlan.vue';

export default {
  components: { PersonDetail, Information ,community, InsertPlan},
    Planrops: {
    loger: {
      type: Object,
      default: {},
    },
  },
  data() {
    return {
      nomtwo:false,
      communityone:false,
      plantwo:false,
      Communitylist: [{}],
      persons: [{}],
      plants: [{}],
      plans: [{}],
      dialogFormVisible: false,
    };
  },
  methods: {
    nomone() {
      this.dialogFormVisible = true;
    },
    nomtwo() {
      this.$router.push("/updateuser");
    },
    communityone() {
      this.$router.push("/navtylir/community");
    },
    communitytwo() {
      console.log("点击");
      this.$router.push("/navtylir/person");
    },
    communitythree() {
      this.$router.push("/navtylir/plant");
    },
    planone() {
      this.$router.push("/navtylir/plan");
    },
   
  },
};
</script>

<style scoped>
.el-sub-menu {
  margin-top: 15px;
}
.mb-2 {
  margin-left: 80px;
  margin-top: 50px;
}
span {
  margin-left: 20px;
  font-size: 18px;
}
.el-icon {
  margin-left: 50px;
  margin-right: -8px;
}
.el-menu-item {
  margin-left: 70px;
  font-size: 16px;
}
</style>